package com.coocaa.ops.plus.core.third.magic;

import com.coocaa.ops.plus.core.third.ThirdServiceProperties;
import com.coocaa.ops.plus.core.third.magic.model.PosterMergeParamsInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.net.URI;
import java.net.URISyntaxException;

/**
 * @author bjh
 * @description
 * @date 2020/12/22 19:49
 */
@Service
public class MagicFeignClientService {
    @Autowired
    private MagicFeignClient magicFeignClient;
    @Autowired
    private ThirdServiceProperties thirdServiceProperties;


    public String aiPosterMerge(PosterMergeParamsInfo data) {
        try {
            return magicFeignClient.aiPosterMerge(new URI(thirdServiceProperties.getMagicServiceUrl()), data);
        } catch (URISyntaxException e) {
            e.printStackTrace();
            return "";
        }
    }


}
